#!/usr/bin
#import cwiid
from time import sleep
import serial
#import rollo.wiimote
import rollo.pololu
import rollo.dialog
import logging

import logging.config
import wx

logging.config.fileConfig("conf/rollo.log.conf")

#w= rollo.wiimote.Wiimote()

p= rollo.pololu.TReX('/dev/ttyUSB0')

app = wx.PySimpleApp()
dlg = rollo.dialog.Dialog(None, -1, p)
dlgrslt = dlg.ShowModal()

if dlgrslt != wx.ID_OK:
    print ('Exiting..')
    exit
else:
    pass

dlg.Destroy()
app.MainLoop()

